<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: eventListener</title>
    
    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">
    
    <h1 class="page-title">Class: eventListener</h1>
    
    



<section>
    
<header>
    <h2>
        <span class="ancestors"><a href="module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a>~</span>
    
    eventListener
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <h4 class="name" id="eventListener"><span class="type-signature"></span>new eventListener<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Event listeners used by EasyRTC. Many of these can be overridden using server options. The interfaces should be used as a guide for creating new listeners.
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 24
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <h4 class="name" id="onAuthenticate"><span class="type-signature">&lt;static> </span>onAuthenticate<span class="signature">(socket, easyrtcid, appName, username, credential, easyrtcAuthMessage, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "authenticate". This event is called as part of the authentication process. To deny authentication, call the next() with an Error. By default everyone gets in!
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>socket</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Socket.io socket object. References the individual connection socket.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Unique identifier for an EasyRTC connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>appName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Application name which uniquely identifies it on the server.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>username</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">Username to assign to the connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>credential</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">Credential for the connection. Can be any JSONable object.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>easyrtcAuthMessage</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Message object containing the complete authentication message sent by the connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 37
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onAuthenticated"><span class="type-signature">&lt;static> </span>onAuthenticated<span class="signature">(connectionObj, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "authenticated". This event is called after a connection is authenticated and the connection object is generated and requested rooms are joined. Call next(err) to continue the connection procedure.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 48
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onConnection"><span class="type-signature">&lt;static> </span>onConnection<span class="signature">(socket, easyrtcid, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "connection". This event is called when socket.io accepts a new connection.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>socket</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io socket object. References the individual connection socket.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Unique identifier for an EasyRTC connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 60
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onDisconnect"><span class="type-signature">&lt;static> </span>onDisconnect<span class="signature">(connectionObj, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "disconnect". This event is called when socket.io detects a disconnection. Disconnections can occur due to either side purposefully dropping a connection, network disconnection, or time out.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 86
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEasyrtcAuth"><span class="type-signature">&lt;static> </span>onEasyrtcAuth<span class="signature">(socket, easyrtcid, msg, socketCallback, callback)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "easyrtcAuth". This event is fired when an incoming 'easyrtcAuth' message is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>socket</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io socket object. References the individual connection socket.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Unique identifier for an EasyRTC connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message object which contains the full message from a client; this can include the standard msgType and msgData fields.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>callback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Callback to call upon completion. Delivers parameter (err, connectionObj).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 127
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEasyrtcCmd"><span class="type-signature">&lt;static> </span>onEasyrtcCmd<span class="signature">(connectionObj, msg, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "easyrtcCmd". This event is fired when an incoming 'easyrtcCmd' message is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message object which contains the full message from a client; this can include the standard msgType and msgData fields.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 444
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEasyrtcMsg"><span class="type-signature">&lt;static> </span>onEasyrtcMsg<span class="signature">(connectionObj, msg, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "easyrtcMsg". This event is fired when an incoming 'easyrtcMsg' message is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message object which contains the full message from a client; this can include the standard msgType and msgData fields.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 551
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitEasyrtcCmd"><span class="type-signature">&lt;static> </span>onEmitEasyrtcCmd<span class="signature">(connectionObj, msgType, msg, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitEasyrtcCmd". This event is fired when the server should emit an EasyRTC command to a client.

The easyrtcid and serverTime fields will be added to the msg automatically.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msgType</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message type of the message.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message object which contains the full message to a client; this can include the standard msgData field.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 799
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitEasyrtcMsg"><span class="type-signature">&lt;static> </span>onEmitEasyrtcMsg<span class="signature">(connectionObj, msgType, msg, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitEasyrtcMsg". This event is fired when the server should emit an EasyRTC message to a client.

The easyrtcid and serverTime fields will be added to the msg automatically.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msgType</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message type of the message.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Message object which contains the full message to a client; this can include the standard msgData field.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 830
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitError"><span class="type-signature">&lt;static> </span>onEmitError<span class="signature">(connectionObj, errorCode, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitError". This event is fired when the server should emit an EasyRTC error to a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>errorCode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC error code associated with an error.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 859
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitReturnAck"><span class="type-signature">&lt;static> </span>onEmitReturnAck<span class="signature">(connectionObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitReturnAck". This event is fired when the server should return an Ack to a client via an acknowledgment message.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 881
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitReturnError"><span class="type-signature">&lt;static> </span>onEmitReturnError<span class="signature">(connectionObj, socketCallback, errorCode, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitReturnError". This event is fired when the server should return an Error to a client via an acknowledgment message.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>errorCode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC error code associated with an error.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 910
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onEmitReturnToken"><span class="type-signature">&lt;static> </span>onEmitReturnToken<span class="signature">(connectionObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "emitReturnToken". This event is fired when the server should return a token to a client via an acknowledgment message.

This is done after a client has been authenticated and the connection has been established.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 939
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onGetIceConfig"><span class="type-signature">&lt;static> </span>onGetIceConfig<span class="signature">(connectionObj, callback)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "getIceConfig". Returns an ICE configuration object to the callback.

The ICE configuration object will hold the array of STUN and TURN servers the connection should use when forming a peer connection. This default listener uses the "appIceServers" configuration option at the application level.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>callback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Function</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Callback of form (err, iceConfigArray)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1373
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onLog"><span class="type-signature">&lt;static> </span>onLog<span class="signature">(level, logText, <span class="optional">logFields</span>, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "log". This event is fired when ever a loggable item is observed.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>level</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Log severity level. Can be ("debug"|"info"|"warning"|"error")</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>logText</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Text for log.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>logFields</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>
            
            
                <td class="attributes">
                
                    &lt;optional><br>
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1043
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeGetIceConfig"><span class="type-signature">&lt;static> </span>onMsgTypeGetIceConfig<span class="signature">(connectionObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeGetIceConfig". This event is fired when an easyrtcCmd message with msgType of "getIceConfig" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1220
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeGetRoomList"><span class="type-signature">&lt;static> </span>onMsgTypeGetRoomList<span class="signature">(connectionObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeGetRoomList". This event is fired when an easyrtcCmd message with msgType of "getRoomList" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1250
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeRoomJoin"><span class="type-signature">&lt;static> </span>onMsgTypeRoomJoin<span class="signature">(connectionObj, rooms, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeRoomJoin". This event is fired when an easyrtcCmd message with msgType of "roomJoin" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>rooms</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A room object containing a map of room names.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1108
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeRoomLeave"><span class="type-signature">&lt;static> </span>onMsgTypeRoomLeave<span class="signature">(connectionObj, rooms, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeRoomLeave". This event is fired when an easyrtcCmd message with msgType of "roomLeave" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>rooms</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">A room object containing a map of room names.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1180
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeSetPresence"><span class="type-signature">&lt;static> </span>onMsgTypeSetPresence<span class="signature">(connectionObj, presenceObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeSetPresence". This event is fired when an easyrtcCmd message with msgType of "setPresence" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>presenceObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Presence object which contains all the fields for setting a presence for a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1284
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onMsgTypeSetRoomApiField"><span class="type-signature">&lt;static> </span>onMsgTypeSetRoomApiField<span class="signature">(connectionObj, roomApiFieldObj, socketCallback, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "msgTypeSetRoomApiField". This event is fired when an easyrtcCmd message with msgType of "setRoomApiField" is received from a client.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>roomApiFieldObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Api Field object which contains all the fields for setting a presence for a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Socket.io callback function which delivers a response to a socket. Expects a single parameter (msg).</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1328
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onRoomCreate"><span class="type-signature">&lt;static> </span>onRoomCreate<span class="signature">(appObj, creatorConnectionObj, roomName, roomOptions, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "roomCreate". Creates a room attached to an application with a specified room name. The optional creatorConnectionObj is provided to provide context; joining the room is done separately. If successful, the callback returns a roomObj.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Argument</th>
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>appObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">EasyRTC application object. Contains methods used for identifying and managing an application.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>creatorConnectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">EasyRTC connection object belonging to the creator of the room. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>roomName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>roomOptions</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                    &lt;nullable><br>
                
                </td>
            
            
            
            
            <td class="description last">Room options. May be null.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
                <td class="attributes">
                
                    
                
                </td>
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1388
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onRoomJoin"><span class="type-signature">&lt;static> </span>onRoomJoin<span class="signature">(connectionObj, roomName, callback)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "roomJoin". Joins a connection to a a specified room. If successful, the callback will return a connectionRoomObj.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>roomName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>callback</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Function</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Callback of form (err, connectionRoomObj)</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1401
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onRoomLeave"><span class="type-signature">&lt;static> </span>onRoomLeave<span class="signature">(connectionObj, roomName, next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "roomLeave". Run upon a connection leaving a room.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>connectionObj</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            
            
            <td class="description last">EasyRTC connection object. Contains methods used for identifying and managing a connection.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>roomName</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>
            
            
            
            
            
            <td class="description last">Room name which uniquely identifies a room within an EasyRTC application.</td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1423
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onShutdown"><span class="type-signature">&lt;static> </span>onShutdown<span class="signature">(next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "shutdown". This event is fired when the server is being shutdown.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1448
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="onStartup"><span class="type-signature">&lt;static> </span>onStartup<span class="signature">(next)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        Default listener for event "startup". This event initializes EasyRTC server so it is ready for connections.
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>next</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#nextCallback">nextCallback</a></span>


            
            </td>
            
            
            
            
            
            <td class="description last">A success callback of form next(err).</td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_default_event_listeners.js.html">easyrtc_default_event_listeners.js</a>, line 1459
    </li></ul></dd>
    
    
    
    
    
    
    
</dl>

    
    
    
    
    
    
    
    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a></li><li><a href="module-easyrtc_public_obj.html">easyrtc_public_obj</a></li></ul><h3>Classes</h3><ul><li><a href="module-easyrtc_default_event_listeners-eventListener.html">eventListener</a></li><li><a href="module-easyrtc_public_obj-pub.html">pub</a></li><li><a href="module-easyrtc_public_obj-pub.events.html">events</a></li><li><a href="module-easyrtc_public_obj-pub.util.html">util</a></li><li><a href="pub.appObj.html">appObj</a></li><li><a href="pub.appObj.connectionObj.html">connectionObj</a></li><li><a href="pub.appObj.connectionObj.connectionRoomObj.html">connectionRoomObj</a></li><li><a href="pub.appObj.roomObj.html">roomObj</a></li><li><a href="pub.appObj.sessionObj.html">sessionObj</a></li></ul><h3>Global</h3><ul></ul>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Mar 05 2014 12:50:34 GMT-0800 (PST)
</footer>

<script> prettyPrint(); </script>
</body>
</html>
